from war_utils import *
from game_top_class import *

# 面向对象编程例子


# step2: 从"模版"创建"对象"
magic1 = Magic("ZhuXY", "Super", 10000, 10000, 1, 10000)
magic2 = Magic("HuXB", "Fire", 100, 50, 0.5, 100)

soldier1 = Soldier("XuZY", "KuangBao", 200, 300, 5, 100)
soldier2 = Soldier("ZhengZP", "FangYu", 500, 80, 1, 100)

magics = [magic1, magic2]
soldiers = [soldier1, soldier2]

while(True):
    print("法师的回合")
    for i in magics:
        print("现在操作法师： %s" % i.name)
        op_num = input("选择%s执行的操作" %i.name)
        i.op_deal_with(int(op_num), soldier1)

    soldier1.info()
    soldier2.info()